#ifndef __tenacitas_interlace_text_core_layout_tester_h__
#define __tenacitas_interlace_text_core_layout_tester_h__

#include <iostream>
#include <cstdint>
#include <string>

#include "runtest.h"

#include <tenacitas.interlace_text.core/layout.h>


namespace tenacitas {
    namespace interlace_text {
        namespace core {

            class layout_tester {

            private:
                struct supplier {
                    struct interlace {};    
                    typedef std::string text;
                };

                typedef typename supplier::text text;
                typedef core::layout<supplier> layout;
                

                static bool test1() {
                    std::cerr << "\n+++ layout_tester::test1" << std::endl;

                    typedef core::layout<supplier> layout;
                    
                    text _t("sorvete");
                    
                    layout _l(0,_t);
                    
                    std::cerr << _l << std::endl;
                    return true;
                }

                static bool test2() {
                    std::cerr << "\n+++ layout_tester::test2" << std::endl;

                    

                    text _text("sorvete");
                    
                    layout _l1(0,_text);

                    std::cerr << _l1 << std::endl;

                    return (
                        (_l1.get_orientation() == layout::orientation::undef) &&
                        (_l1.get_text() == _text) );
                }

            public:
                static void run() {
                    runtest(layout_tester::test1());
                    runtest(layout_tester::test2());
                }
            };

        }
    }
}

#endif
